package com.normal.zbase.impl.http.api

import com.normal.zbase.impl.http.impl.bean.ChannelStatusInfoBean
import com.normal.zbase.impl.http.impl.bean.LoginResultBean
import io.reactivex.Flowable
import io.reactivex.Observable
import kotlinx.coroutines.flow.Flow
import okhttp3.ResponseBody
import retrofit2.http.*

/**
 * Created by zsf on 2022/12/29 10:23
 * ******************************************
 * * Retrfit 注解模式
 * ******************************************
 */
interface ApiLogin {

    @GET("sto/rest/admin/api/v1/channel/task/not/status")
    fun selectChannelStatus(@Query("orderChannel") orderChannel: String?): Flowable<ChannelStatusInfoBean>

    @POST("cloudpick/rest/admin/api/v1/logon/account/user/login")
    fun login(@Body body: Any): Flowable<LoginResultBean>


    @GET("sto/rest/admin/api/v1/channel/task/not/status")
     suspend fun selectChannelStatusSync(@Query("orderChannel") orderChannel: String?): ChannelStatusInfoBean

//    @POST("cloudpick/rest/admin/api/v1/logon/account/user/login")
//    suspend fun loginSync(@Body body: Any): LoginResultBean
    @GET("stl/pcs/patient/order/query")
     suspend fun queryOrder(@Query("pageSize") pageSize: String,@Query("pageNum") pageNum: String): LoginResultBean

    /**
     * 下载文件的地址服务
     */
    @GET
    @Streaming
    fun downloadFile(@Url url: String?): Observable<ResponseBody>

}